--- import translate from '$i18n/translate'; import tPage from '$i18n/translations/pages/news'; import Page from '$layouts/Page.astro'; import getLocaleFromPath from '$lib/getLocaleFromPath'; import localeStaticPaths from '$lib/localeStaticPaths'; import { getCollection } from 'astro:content'; import { isNewsItemInLocale } from '$lib/newsUtils'; import NewsIndex from '$components/NewsIndex/NewsIndex.astro'; const allNews = await getCollection('news'); const locale = getLocaleFromPath(Astro.url.pathname); const allNewsInLocale = allNews.filter((item) => isNewsItemInLocale(item, locale)); const t = translate(locale); export async function getStaticPaths() { return localeStaticPaths; } ---

{t(tPage, { key: 'title' })}